net: vrf: Make add_fib_rules per network namespace flag
authorDavid Ahern <dsahern@gmail.com>
Thu, 8 Jun 2017 17:31:11 +0000 (11:31 -0600)
committerRaspbian kernel package updater <root@raspbian.org>
Sun, 23 Jul 2017 03:03:18 +0000 (03:03 +0000)
commit228a684fb4a4ab6b71be8bdf51c573edef172a48
tree164aa1a3784e4c1a492d5a4ad8d7a54d6ed10b86
parent3f5dd707957d02ce8588c43784a771618cc1238c
net: vrf: Make add_fib_rules per network namespace flag

[ Upstream commit 097d3c9508dc58286344e4a22b300098cf0c1566 ]

Commit 1aa6c4f6b8cd8 ("net: vrf: Add l3mdev rules on first device create")
adds the l3mdev FIB rule the first time a VRF device is created. However,
it only creates the rule once and only in the namespace the first device
is created - which may not be init_net. Fix by using the net_generic
capability to make the add_fib_rules flag per network namespace.

Fixes: 1aa6c4f6b8cd8 ("net: vrf: Add l3mdev rules on first device create")
Reported-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/vrf.c